package lab02.test28;

import java.util.InputMismatchException;
import java.util.Scanner;

public class Test28 {
    public static void main(String[] args) {

        try {
            //从键盘输入一个double类型的圆的半径
            Scanner sc = new Scanner(System.in);
            System.out.println("请输入圆的半径：radius");
            double radius = sc.nextDouble();
            System.out.println("该圆的面积是：" + radius * radius * 3.14);
        } catch (InputMismatchException e) {
            System.out.println("你输入的数据类型出错！");
            e.printStackTrace();
        }
    }
}
